﻿@model IEnumerable<Hospital>
<div style="height: 400px; overflow: auto;" id="treeselectroot">
    <ul >
        <li>
            <div class="catalog-title">
                常规随访选择:全部医院</div>
            <ul>
                @foreach (var h in Model)
                {
                    <li class='closed'>
                        <div>
                            @Html.DisplayFor(m => h.HospName)
                        </div>
                        @if (h.BingQus.Count > 0)
                        { 
                            <ul>
                                @foreach (var b in h.BingQus)
                                {
                                    <li class='closed'>
                                        <div>
                                            @Html.DisplayFor(m => b.Title)
                                        </div>
                                        @if (b.Departments.Count > 0)
                                        { 
                                            <ul>
                                                @foreach (var d in b.Departments)
                                                {
                                                    <li class='closed'>
                                                        <div>
                                                            @Html.DisplayFor(m => d.DepName)
                                                        </div>
                                                        @if (d.QizSubjects.Count > 0)
                                                        { 
                                                            <ul>
                                                                @foreach (var s in d.QizSubjects)
                                                                {
                                                                    <li>
                                                                        <div>
                                                                            @*<input type="radio" name="selection" value="@(s.ID)" title="@(s.Title)" id="c@(s.ID)" />
                                                                            <label for="c@(s.ID)">@s.Title</label>*@

                                                                            <a class='sel' href="#" value="@(s.ID)">@s.Title</a> &nbsp;&nbsp;  <a href="@(Url.Action("QizSessionEdit", "Doctor", new { SubjectID = s.ID, PreviewOnly = true, _newpage = "true" }))" target="_blank">查看</a>
                                                                        </div>
                                                                    </li>
                                                                }
                                                            </ul>
                                                        }
                                                    </li>
                                                }
                                            </ul>
                                        }
                                    </li>
                                }
                            </ul>
                        }   
                    </li>
                }
            </ul>
        </li>
    </ul>
</div>
<script type="text/javascript">
    $(function () {
        $("#treeselectroot").treeview();
        $('#treeselectroot a.sel').click(function () {
            $('#CV').val($(this).text() + ":" + $(this).attr('value'));
            $("#dialogbox").dialog('close');
            return false;
        });

    });
</script>
@*
<button onclick="$('#CV').val($('#treeselectroot :radio[checked=true]').attr('title')+':'+$('#treeselectroot :radio[checked=true]').val());$('#treeselectroot').toggle('bliend');"
    value="确定">
    确定</button>*@
